package com.nimitz.web.controller.module.drip;

import com.nimitz.common.core.controller.BaseController;
import com.nimitz.common.core.domain.AjaxResult;
import com.nimitz.module.drip.service.IDriBusinessService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 滴灌通-日营业额维护
 */
@RestController
@Api(tags = "滴灌通-日营业额维护")
@RequestMapping("/module/drip/business")
public class DriBusinessController extends BaseController {

    @Resource
    private IDriBusinessService businessService;

    /**
     * 生成日营业额
     *
     * @param brandName 品牌名称
     * @param orderDate 订单日期
     * @return 结果
     */
    @GetMapping("/generate")
    @ApiOperation(value = "生成日营业额")
    public AjaxResult generateBusiness(@RequestParam("brandName") String brandName, @RequestParam("orderDate") String orderDate) {
        return toAjax(businessService.generateBusiness(brandName, orderDate));
    }
}
